import { useAppStore } from "src/stores/app-store"
import type { Router, RouteLocationNormalizedLoaded } from "vue-router"
import { useWxHook, } from 'src/hooks/wx_hooks';

export const useAfterHandler = (router: Router, route: RouteLocationNormalizedLoaded) => {
  return {
    afterHandler: (isApp: boolean = false) => {
      return useWxHook().gotoEvaluteSuccess(route)
      // return router.replace({path: '/shop', query: {...route.query, isFail: 0}})
      // const  {pageType, } = useAppStore()
      // if (pageType === 'auth' || isApp) {
      //   return router.replace({path: '/evaluateAuth', query: route.query})
      // }
      // router.replace({path: '/evaluate', query: route.query})
    }
  }
}
